﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace calculation.Models
{
    public class ProducerRepository 
    {
        private UchetDataContext _datacontext;

        public ProducerRepository(UchetDataContext datacontext)
        {
            _datacontext = datacontext;
        }

        public IEnumerable<Producer> GetProducers()
        {
            return _datacontext.Producers.OrderBy(p => p.FirmName);
        }
        

    }
}
